import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import Login from '@/components/login_regi/Login';
import Register from '@/components/login_regi/Register.vue'
import home from '@/components/Home'
import shopping from '@/components/ShoppingCar.vue'
import product from '@/components/ProductDetails.vue'
import order from '@/components/core/Order.vue'
let state=false;


Vue.use(Router)

export default new Router({
  routes: [
    {path:'/',redirect:"/index/false/home"},
    {path:'/index',redirect:"/index/false/home"},
    {path: '/index/:state',name: 'index',component: index,children:[
        {path: 'login',name: 'Login',component: Login},
        {path: 'register',name: 'Register',component:Register},
        {path: 'home',name: 'home',component:home},
        {path: 'shopping',name: 'shopping',component:shopping},
        {path:'product',name: 'product',component: product},
        {path:'exit',redirect:"/index/false/home"},
        // 我的订单
        {path:'order',name: 'order',component: order},
      ]
    },
  ]
})
